package history

import (
	"sync"
)

// Memory represents the agent's memory store.
// 存储交互历史的容器
type Memory struct {
	Messages []HistoryMessage
	mu       sync.Mutex
}

// AddMessage adds a message to the memory.
func (m *Memory) AddMessage(msg HistoryMessage) {
	m.mu.Lock()
	defer m.mu.Unlock()
	m.Messages = append(m.Messages, msg)
}
